const labelService = require('../service/label.service')

class LabelController {
    async created(ctx, next) {
        // 1.获取用户传递过来的标签信息
        const { name } = ctx.request.body
        console.log(name)
        // 3.查看存储的结果，告知前端创建工作
        const result = await labelService.create(name)
        ctx.body = {
            message: '创建标签成功',
            data: result
        }
    }

}
module.exports = new LabelController() 